package com.hxkj.mapper;

import com.hxkj.domain.po.AuthFunction;
import com.platform.common.domain.annotation.EnableDataSource;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Mrmas
 * @create 2018-05-21 18:15
 * @desc 功能列表xml
 **/
@Repository("functionMapper")
public interface FunctionMapper {
    /**
     * 查询功能列表层
     * @param authFunction
     * @return
     */
    @EnableDataSource("slave")
    List<AuthFunction> getFunctionList(AuthFunction authFunction);

    /**
     * 获取功能列表(启用状态的功能)
     * @param authFunction
     * @return
     */
    List<AuthFunction> getFunctionListByStatus(AuthFunction authFunction);

    /**
     * 新增功能列表
     * @param authFunction
     * @return
     */
    int saveAuthFunction(AuthFunction authFunction);

    /**
     * 更新功能列表
     * @param authFunction
     * @return
     */
    int updateAuthFunction(AuthFunction authFunction);


    /**
     * 查询单个功能
     * @param authFunction
     * @return
     */
    AuthFunction queryAuthFunction(AuthFunction authFunction);


    /**
     * 删除单个功能节点
     * @param authFunction
     * @return
     */
    int deleteAuthFunction(AuthFunction authFunction);

    /**
     * 更新排序
     *
     * @param ath 功能对象
     * @throws Exception
     */
    int modifyOrderId(AuthFunction ath);

    /**
     * 修改状态
     * @param ath
     * @return
     */
    int modifyFunctionStatus(AuthFunction ath);
}
